Skip to content

[AMORO-4280] Add support for Lance format on REST metastore - #4334

Merged
zhoujinsong merged 3 commits into
apache:masterfrom
zhangwl9:AMORO-add-rest-lance-dev
Aug 26, 2026
Merged

[AMORO-4280] Add support for Lance format on REST metastore#4334
zhoujinsong merged 3 commits into
apache:masterfrom
zhangwl9:AMORO-add-rest-lance-dev

Conversation

@zhangwl9

@zhangwl9 zhangwl9 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Why are the changes needed?

Close #4280 .

Brief change log

  • Register LANCE as a supported table format for REST metastore
  • Enforce one-protocol-per-uri: reject combining LANCE with other
    formats(iceberg、mixed_iceberg)on REST metastore
  • Add LanceRestCatalog backed by lance REST namespace API
  • Extract shared logic into AbstractLanceCatalog; slim down
    LanceDirectoryV1Catalog
  • Frontend: opt-in LANCE checkbox, default Iceberg family, hide
    storage/auth config when REST + LANCE is selected

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible
    test by gravitino-lance rest service
part1 part2 PART3 PART4
  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@github-actions github-actions Bot added module:ams-server Ams server module module:ams-dashboard Ams dashboard module module:common labels Aug 24, 2026
@zhangwl9
zhangwl9 force-pushed the AMORO-add-rest-lance-dev branch from 54393c7 to 2502ea9 Compare August 25, 2026 04:31
@zhangwl9
zhangwl9 force-pushed the AMORO-add-rest-lance-dev branch from 2502ea9 to db3d546 Compare August 25, 2026 07:14
@zhangwl9 zhangwl9 changed the title [AMORO-] Add support for Lance format on REST metastore [AMORO-4280] Add support for Lance format on REST metastore Aug 25, 2026

@zhoujinsong zhoujinsong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks a lot for the work!

@zhoujinsong
zhoujinsong merged commit 505a66e into apache:master Aug 26, 2026
7 checks passed
&& tableFormats.size() > 1),
"REST catalog serves a single protocol per uri,"
+ " Lance cannot be combined with other table formats: %s",
tableFormats);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check only runs when building a catalog. Updating an already loaded REST catalog bypasses CatalogBuilder, so an API request can persist LANCE,ICEBERG and leave the catalog broken after refresh or restart. Please enforce this invariant before updates are persisted as well.

if (response == null) {
return Collections.emptyList();
}
return new ArrayList<>(response.getTables());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The REST response is paginated via pageToken, but this returns only the first page, so larger catalogs silently miss tables. Please follow the token until it is empty; listDatabases() needs the same handling.

})
Object.keys(formState.authConfig).forEach((key) => {
delete formState.authConfig[key]
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selecting Lance deletes the existing storage/auth values. If the user switches back to Iceberg and saves, those credentials are lost. Since handleSave() already replaces the Lance payload, please preserve the form state here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Integrate Lance to support Rest as a metastore

3 participants